<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<h1>SSM</h1>
<%--查询全部--%>
<h2>
    <a href="${pageContext.request.contextPath}/cat/getAll">查询全部</a>
</h2>

<%--新增--%>
<form action="${pageContext.request.contextPath}/cat/add" method="post">
    <input type="number" name="id" placeholder="请输入id">
    <input type="text" name="name" placeholder="请输入姓名">
    <input type="text" name="color" placeholder="请输入颜色">

    <input type="submit" value="新增">
</form>

<br>

<%--通过id修改--%>
<form action="${pageContext.request.contextPath}/cat/updateById" method="post">
    <input type="number" name="id" placeholder="请输入id">
    <input type="text" name="name" placeholder="请输入姓名">
    <input type="submit" value="修改">
</form>


<%--通过id删除--%>
<form action="${pageContext.request.contextPath}/cat/deleteById" method="post">
    <input type="text" name="id" placeholder="请输入id">
    <input type="submit" value="删除">
</form>


<%--通过id查询--%>
<form action="${pageContext.request.contextPath}/cat/getById" method="post">
    <input type="number" name="id" placeholder="请输入id">
    <input type="submit" value="查询">
</form>


<%--分页查询--%>
<form action="${pageContext.request.contextPath}/cat/findByPage" method="post">
    <input type="number" name="page" placeholder="请输入页数">
    <input type="number" name="size" placeholder="请输入每页显示条数">
    <input type="submit" value="查询">
</form>

</body>
</html>
